import { Component, OnInit } from '@angular/core';
import { HttpRequest } from "../../../service/httpRequest";
import { PageModel } from "../../../model/page-model";
import { flyIn } from '../../../animations/fly-in';

@Component({
  selector: 'app-group',
  templateUrl: './group.component.html',
  styleUrls: ['./group.component.css'],
  animations: [
    flyIn
  ]
})
export class GroupComponent implements OnInit {

  data:any;
  pageModel = new PageModel();
  oo:any = {devicename:'',province:'',city:'',district:''};
  page:number = 1;

  constructor(private httpRequest:HttpRequest) { }

  ngOnInit() {
    this.getData();
  }

  getData(){
    this.httpRequest.sendGet('device/group/list').subscribe(res => {
      this.data = res.result;
      //this.pageModel.setPage({'iTotalRecords':res.result.iTotalRecords});
    },err => console.log(err));
  }

}
